package com.futong.cloud.dao;

import com.futong.cloud.utils.SpringUtils;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CrudMapper {
    class Mappers{
        public static CrudMapper crud = SpringUtils.getBean(CrudMapper.class);
    }
    @Insert("<script>" +
            "insert into `${table}`" +
            "<foreach collection='columns' item='column' open='(' separator=',' close=')'>${column}</foreach>"+
            "values ${values}"+
            "</script>")
    int insert(String table, List<String> columns,String values);

}
